/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package controlacciones.ejb3.entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author vanessa
 */
@Entity
@Table(name = "tb_lectura1")
@NamedQueries({
    @NamedQuery(name = "TbLectura1.findAll", query = "SELECT t FROM TbLectura1 t"),
    @NamedQuery(name = "TbLectura1.findByIdLectura", query = "SELECT t FROM TbLectura1 t WHERE t.tbLectura1PK.idLectura = :idLectura"),
    @NamedQuery(name = "TbLectura1.findByLecregcod", query = "SELECT t FROM TbLectura1 t WHERE t.lecregcod = :lecregcod"),
    @NamedQuery(name = "TbLectura1.findByLeczoncod", query = "SELECT t FROM TbLectura1 t WHERE t.leczoncod = :leczoncod"),
    @NamedQuery(name = "TbLectura1.findByLecseccod", query = "SELECT t FROM TbLectura1 t WHERE t.lecseccod = :lecseccod"),
    @NamedQuery(name = "TbLectura1.findByRutleccod", query = "SELECT t FROM TbLectura1 t WHERE t.rutleccod = :rutleccod"),
    @NamedQuery(name = "TbLectura1.findByRutsec", query = "SELECT t FROM TbLectura1 t WHERE t.rutsec = :rutsec"),
    @NamedQuery(name = "TbLectura1.findByPremzn", query = "SELECT t FROM TbLectura1 t WHERE t.premzn = :premzn"),
    @NamedQuery(name = "TbLectura1.findByPrelote", query = "SELECT t FROM TbLectura1 t WHERE t.prelote = :prelote"),
    @NamedQuery(name = "TbLectura1.findByPresublote", query = "SELECT t FROM TbLectura1 t WHERE t.presublote = :presublote"),
    @NamedQuery(name = "TbLectura1.findByConcodtip", query = "SELECT t FROM TbLectura1 t WHERE t.concodtip = :concodtip"),
    @NamedQuery(name = "TbLectura1.findByMedcodnro", query = "SELECT t FROM TbLectura1 t WHERE t.medcodnro = :medcodnro"),
    @NamedQuery(name = "TbLectura1.findByMedfecha", query = "SELECT t FROM TbLectura1 t WHERE t.medfecha = :medfecha"),
    @NamedQuery(name = "TbLectura1.findByLecmed", query = "SELECT t FROM TbLectura1 t WHERE t.lecmed = :lecmed"),
    @NamedQuery(name = "TbLectura1.findByMedobscod", query = "SELECT t FROM TbLectura1 t WHERE t.medobscod = :medobscod"),
    @NamedQuery(name = "TbLectura1.findByMedfacfec", query = "SELECT t FROM TbLectura1 t WHERE t.tbLectura1PK.medfacfec = :medfacfec"),
    @NamedQuery(name = "TbLectura1.findByMedflag", query = "SELECT t FROM TbLectura1 t WHERE t.medflag = :medflag"),
    @NamedQuery(name = "TbLectura1.findByInscrinro", query = "SELECT t FROM TbLectura1 t WHERE t.inscrinro = :inscrinro"),
    @NamedQuery(name = "TbLectura1.findByLectant", query = "SELECT t FROM TbLectura1 t WHERE t.lectant = :lectant"),
    @NamedQuery(name = "TbLectura1.findByFecant", query = "SELECT t FROM TbLectura1 t WHERE t.fecant = :fecant"),
    @NamedQuery(name = "TbLectura1.findByPromedio", query = "SELECT t FROM TbLectura1 t WHERE t.promedio = :promedio"),
    @NamedQuery(name = "TbLectura1.findByConsumo", query = "SELECT t FROM TbLectura1 t WHERE t.consumo = :consumo"),
    @NamedQuery(name = "TbLectura1.findByMensaje", query = "SELECT t FROM TbLectura1 t WHERE t.mensaje = :mensaje"),
    @NamedQuery(name = "TbLectura1.findByDias", query = "SELECT t FROM TbLectura1 t WHERE t.dias = :dias"),
    @NamedQuery(name = "TbLectura1.findByTipoconsu", query = "SELECT t FROM TbLectura1 t WHERE t.tipoconsu = :tipoconsu"),
    @NamedQuery(name = "TbLectura1.findByDigcod", query = "SELECT t FROM TbLectura1 t WHERE t.digcod = :digcod"),
    @NamedQuery(name = "TbLectura1.findByArchivo", query = "SELECT t FROM TbLectura1 t WHERE t.archivo = :archivo"),
    @NamedQuery(name = "TbLectura1.findByFechactu", query = "SELECT t FROM TbLectura1 t WHERE t.fechactu = :fechactu"),
    @NamedQuery(name = "TbLectura1.findByFok", query = "SELECT t FROM TbLectura1 t WHERE t.fok = :fok"),
    @NamedQuery(name = "TbLectura1.findByNombre", query = "SELECT t FROM TbLectura1 t WHERE t.nombre = :nombre"),
    @NamedQuery(name = "TbLectura1.findByDireccion", query = "SELECT t FROM TbLectura1 t WHERE t.direccion = :direccion"),
    @NamedQuery(name = "TbLectura1.findByCodtipoaccion", query = "SELECT t FROM TbLectura1 t WHERE t.codtipoaccion = :codtipoaccion"),
    @NamedQuery(name = "TbLectura1.findByFlagRegistrada", query = "SELECT t FROM TbLectura1 t WHERE t.flagRegistrada = :flagRegistrada"),
    @NamedQuery(name = "TbLectura1.findByLogUser", query = "SELECT t FROM TbLectura1 t WHERE t.logUser = :logUser"),
    @NamedQuery(name = "TbLectura1.findByMotivo", query = "SELECT t FROM TbLectura1 t WHERE t.motivo = :motivo")})
public class TbLectura1 implements Serializable {
    private static final long serialVersionUID = 1L;
    @EmbeddedId
    protected TbLectura1PK tbLectura1PK;
    @Column(name = "lecregcod")
    private Integer lecregcod;
    @Column(name = "leczoncod")
    private Integer leczoncod;
    @Column(name = "lecseccod")
    private Integer lecseccod;
    @Column(name = "rutleccod")
    private Integer rutleccod;
    @Column(name = "rutsec")
    private Integer rutsec;
    @Column(name = "premzn")
    private Integer premzn;
    @Column(name = "prelote")
    private Integer prelote;
    @Column(name = "presublote")
    private Integer presublote;
    @Column(name = "concodtip")
    private Integer concodtip;
    @Column(name = "medcodnro")
    private String medcodnro;
    @Column(name = "medfecha")
    @Temporal(TemporalType.TIMESTAMP)
    private Date medfecha;
    @Column(name = "lecmed")
    private Double lecmed;
    @Column(name = "medobscod")
    private Integer medobscod;
    @Column(name = "medflag")
    private Integer medflag;
    @Column(name = "inscrinro")
    private String inscrinro;
    @Column(name = "lectant")
    private Double lectant;
    @Column(name = "fecant")
    private String fecant;
    @Column(name = "promedio")
    private Double promedio;
    @Column(name = "consumo")
    private Double consumo;
    @Column(name = "mensaje")
    private String mensaje;
    @Column(name = "dias")
    private Integer dias;
    @Column(name = "tipoconsu")
    private String tipoconsu;
    @Column(name = "digcod")
    private Integer digcod;
    @Column(name = "archivo")
    private String archivo;
    @Column(name = "fechactu")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechactu;
    @Column(name = "fok")
    private Integer fok;
    @Column(name = "nombre")
    private String nombre;
    @Column(name = "direccion")
    private String direccion;
    @Column(name = "codtipoaccion")
    private Integer codtipoaccion;
    @Column(name = "flag_registrada")
    private Boolean flagRegistrada;
    @Column(name = "log_user")
    private String logUser;
    @Column(name = "motivo")
    private String motivo;

    public TbLectura1() {
    }

    public TbLectura1(TbLectura1PK tbLectura1PK) {
        this.tbLectura1PK = tbLectura1PK;
    }

    public TbLectura1(int idLectura, Date medfacfec) {
        this.tbLectura1PK = new TbLectura1PK(idLectura, medfacfec);
    }

    public TbLectura1PK getTbLectura1PK() {
        return tbLectura1PK;
    }

    public void setTbLectura1PK(TbLectura1PK tbLectura1PK) {
        this.tbLectura1PK = tbLectura1PK;
    }

    public Integer getLecregcod() {
        return lecregcod;
    }

    public void setLecregcod(Integer lecregcod) {
        this.lecregcod = lecregcod;
    }

    public Integer getLeczoncod() {
        return leczoncod;
    }

    public void setLeczoncod(Integer leczoncod) {
        this.leczoncod = leczoncod;
    }

    public Integer getLecseccod() {
        return lecseccod;
    }

    public void setLecseccod(Integer lecseccod) {
        this.lecseccod = lecseccod;
    }

    public Integer getRutleccod() {
        return rutleccod;
    }

    public void setRutleccod(Integer rutleccod) {
        this.rutleccod = rutleccod;
    }

    public Integer getRutsec() {
        return rutsec;
    }

    public void setRutsec(Integer rutsec) {
        this.rutsec = rutsec;
    }

    public Integer getPremzn() {
        return premzn;
    }

    public void setPremzn(Integer premzn) {
        this.premzn = premzn;
    }

    public Integer getPrelote() {
        return prelote;
    }

    public void setPrelote(Integer prelote) {
        this.prelote = prelote;
    }

    public Integer getPresublote() {
        return presublote;
    }

    public void setPresublote(Integer presublote) {
        this.presublote = presublote;
    }

    public Integer getConcodtip() {
        return concodtip;
    }

    public void setConcodtip(Integer concodtip) {
        this.concodtip = concodtip;
    }

    public String getMedcodnro() {
        return medcodnro;
    }

    public void setMedcodnro(String medcodnro) {
        this.medcodnro = medcodnro;
    }

    public Date getMedfecha() {
        return medfecha;
    }

    public void setMedfecha(Date medfecha) {
        this.medfecha = medfecha;
    }

    public Double getLecmed() {
        return lecmed;
    }

    public void setLecmed(Double lecmed) {
        this.lecmed = lecmed;
    }

    public Integer getMedobscod() {
        return medobscod;
    }

    public void setMedobscod(Integer medobscod) {
        this.medobscod = medobscod;
    }

    public Integer getMedflag() {
        return medflag;
    }

    public void setMedflag(Integer medflag) {
        this.medflag = medflag;
    }

    public String getInscrinro() {
        return inscrinro;
    }

    public void setInscrinro(String inscrinro) {
        this.inscrinro = inscrinro;
    }

    public Double getLectant() {
        return lectant;
    }

    public void setLectant(Double lectant) {
        this.lectant = lectant;
    }

    public String getFecant() {
        return fecant;
    }

    public void setFecant(String fecant) {
        this.fecant = fecant;
    }

    public Double getPromedio() {
        return promedio;
    }

    public void setPromedio(Double promedio) {
        this.promedio = promedio;
    }

    public Double getConsumo() {
        return consumo;
    }

    public void setConsumo(Double consumo) {
        this.consumo = consumo;
    }

    public String getMensaje() {
        return mensaje;
    }

    public void setMensaje(String mensaje) {
        this.mensaje = mensaje;
    }

    public Integer getDias() {
        return dias;
    }

    public void setDias(Integer dias) {
        this.dias = dias;
    }

    public String getTipoconsu() {
        return tipoconsu;
    }

    public void setTipoconsu(String tipoconsu) {
        this.tipoconsu = tipoconsu;
    }

    public Integer getDigcod() {
        return digcod;
    }

    public void setDigcod(Integer digcod) {
        this.digcod = digcod;
    }

    public String getArchivo() {
        return archivo;
    }

    public void setArchivo(String archivo) {
        this.archivo = archivo;
    }

    public Date getFechactu() {
        return fechactu;
    }

    public void setFechactu(Date fechactu) {
        this.fechactu = fechactu;
    }

    public Integer getFok() {
        return fok;
    }

    public void setFok(Integer fok) {
        this.fok = fok;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public String getDireccion() {
        return direccion;
    }

    public void setDireccion(String direccion) {
        this.direccion = direccion;
    }

    public Integer getCodtipoaccion() {
        return codtipoaccion;
    }

    public void setCodtipoaccion(Integer codtipoaccion) {
        this.codtipoaccion = codtipoaccion;
    }

    public Boolean getFlagRegistrada() {
        return flagRegistrada;
    }

    public void setFlagRegistrada(Boolean flagRegistrada) {
        this.flagRegistrada = flagRegistrada;
    }

    public String getLogUser() {
        return logUser;
    }

    public void setLogUser(String logUser) {
        this.logUser = logUser;
    }

    public String getMotivo() {
        return motivo;
    }

    public void setMotivo(String motivo) {
        this.motivo = motivo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (tbLectura1PK != null ? tbLectura1PK.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TbLectura1)) {
            return false;
        }
        TbLectura1 other = (TbLectura1) object;
        if ((this.tbLectura1PK == null && other.tbLectura1PK != null) || (this.tbLectura1PK != null && !this.tbLectura1PK.equals(other.tbLectura1PK))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "controlacciones.ejb3.entity.TbLectura1[tbLectura1PK=" + tbLectura1PK + "]";
    }

}
